//
//  FamilyMenberTableViewCell.m
//  workApp
//
//  Created by 林 on 2019/1/12.
//  Copyright © 2019 林. All rights reserved.
//

#import "FamilyMenberTableViewCell.h"

@implementation FamilyMenberTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style
         reuseIdentifier:reuseIdentifier];
    self.backgroundColor = [UIColor colorWithHexStr:@"#f7f7f7"];
    if (self) {
        UIView * backView = [[UIView alloc]initWithFrame:CGRectMake(0, 10, MDSCREEN_WIDTH - 20, 80)];
        backView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:backView];
        self.imageV = [[UIImageView alloc]initWithFrame:CGRectMake(20, 15, 50, 50)];
        self.imageV.layer.cornerRadius = 25;
        self.imageV.layer.masksToBounds = true;
        self.imageV.backgroundColor = [UIColor whiteColor];
        [backView addSubview:self.imageV];
        
        self.nameLab = [[UILabel alloc]initWithFrame:CGRectMake(90, 20, MDSCREEN_WIDTH - 100, 20)];
        self.nameLab.text = @"林明达 32岁";
        self.nameLab.font = [UIFont systemFontOfSize:16];
        [backView addSubview:self.nameLab];
        
        self.phoneImageV = [[UIImageView alloc]initWithFrame:CGRectMake(90, 50, 20, 20)];
        self.phoneImageV.backgroundColor = [UIColor whiteColor];
        self.phoneImageV.image = [UIImage imageNamed:@"phone"];
        [backView addSubview:self.phoneImageV];
        self.phoneLab = [[UILabel alloc]initWithFrame:CGRectMake(120, 50, 150, 17)];
        self.phoneLab.font = [UIFont systemFontOfSize:15];
        self.phoneLab.textColor = [UIColor colorWithHexStr:@"#999999"];
        self.phoneLab.text = @"12345678909";
        [backView addSubview:self.phoneLab];
        self.relationLab = [[UILabel alloc]initWithFrame:CGRectMake(MDSCREEN_WIDTH - 100, 25, 60, 30)];
        self.relationLab.textColor = [UIColor colorWithHexStr:@"#6a9524"];
        self.relationLab.adjustsFontSizeToFitWidth = true;
        self.relationLab.font = [UIFont systemFontOfSize:15];
        self.relationLab.layer.cornerRadius = 15;
        self.relationLab.textAlignment = NSTextAlignmentCenter;
        self.relationLab.layer.masksToBounds = true;
        self.relationLab.layer.borderColor = [UIColor colorWithHexStr:@"#6a9524"].CGColor;
        self.relationLab.layer.borderWidth = 2;
        self.relationLab.text = @"测试";
        [backView addSubview:self.relationLab];
    }
    return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
